<template>
	<view class="moduleHead f-row  jc-sb ai-c mt-3 mb-2">
		<view class="left-title  f-row  ai-c">
			<image :src="iconUrl" mode=""></image>
			<text>{{title}}</text>
		</view>
		<view class="right-more  f-row  ai-c" v-if="isMoreBtn" @tap="jumpMore()">
			<text>更多</text>
			<i class='jiantou ml-1'></i>
		</view>
		<view class="right-title  f-row  ai-c" @tap="rightBtn()" v-else>
			{{rightTitle}}
		</view>
	</view>
</template>

<script setup>
	export default {
		props: {
			title: {
				type: String,
				default: ''
			},
			rightTitle: {
				type: String,
				default: ''
			},
			iconUrl: {
				type: String,
				default: ''
			},
			isMoreBtn: {
				type: Boolean,
				default: false
			}
		},
		methods: {
			jumpMore() {
				this.$emit('getMore')
			},
			rightBtn() {
				this.$emit('rightBtnFn')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.right-title {
		font-size: 28upx;
		color: $common-color;
	}

	.left-title {
		image {
			width: 28upx;
			height: 32upx;
			margin-right: 16upx;

		}

		text {
			font-size: 28upx;
			color: #000;
		}
	}

	.right-more {
		text {
			font-size: 24upx;
			color: #BABABA;
		}


	}
</style>
